import time
from tracemalloc import start 

def progress_bar_start(scale, i):
    start = time.perf_counter()

    a = "*" * i
    b = "." * (scale - i)
    c = (i / scale) * 100
    dur = time.perf_counter() - start

    print("\r{:^3.0f}%[{}->{}]{:.2f}s".format(c,a,b,dur), end = "")

    time.sleep(0.1)

def progress_bar_end(scale):
    print("\n" + "end progress successfully".center(scale // 2,"-"))
